using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class PMS_SubSystemMap : EntityTypeConfiguration<PMS_SubSystem>
	{
		public PMS_SubSystemMap()
		{
			// Primary Key
			this.HasKey(t => t.SubSysId);

			// Properties
			this.Property(t => t.SubSysKey)
				.HasMaxLength(50);
				
			this.Property(t => t.SubSysName)
				.HasMaxLength(50);
				
			// Table & Column Mappings
			this.ToTable("PMS_SubSystem");
			this.Property(t => t.SubSysId).HasColumnName("SubSysId");
			this.Property(t => t.SubSysKey).HasColumnName("SubSysKey");
			this.Property(t => t.SubSysName).HasColumnName("SubSysName");
			this.Property(t => t.IsDelete).HasColumnName("IsDelete");
			this.Property(t => t.CreateBy).HasColumnName("CreateBy");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.UpdateBy).HasColumnName("UpdateBy");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
		}
	}
}

